<template>
	<view>
		<view class="content">
			<view v-if="list.length>0">
				<view class="date" v-for="(item,index) in list" :key="index">
					<view class="time" v-if="false">
						<view class="view">
							12:18
						</view>
					</view>
					<view class="list">
						<view class="up">
							<image src="../../static/image/s4.png" v-if="item.status==0" mode=""></image>
							<image src="../../static/image/s3.png" v-else mode=""></image>
							<view class="right">
								系统通知
								<view class="date">
									{{item.createtime}}
								</view>
							</view>
						</view>
						<view class="down">
							{{item.content}}
						</view>
					</view>
				</view>
			</view>
			<view class="none" v-else>
				<view class="none-view">
					<image src="../../static/image/none.png" class="none-image"></image>
					<view class="none-name">
						暂无相关数据~
					</view>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	var than;
	export default {
		data() {
			return {
				list: []
			}
		},
		onLoad(option) {
			than = this;
			than.listOfWaitVerify()
			than.post("api/kmb/lookMessage", {
				type: 'lingdang_count'
			}, function(data) {})
		},
		onReachBottom() {
			than.page++;
			than.listOfWaitVerify()
		},
		methods: {
			listOfWaitVerify() {
				than.post("api/kmb/messageList", {
					page: than.page,
				}, function(data) {
					if (than.page == 1) {
						than.list = data;
					} else {
						than.list = than.list.concat(data)
					}
				})
			}
		}
	}
</script>

<style lang="less">
	page {
		background: #F4F4F7;
	}

	.content {
		padding: 36rpx 36rpx 0;
		
		.date {
			.time {
				height: 112rpx;
				display: flex;
				justify-content: center;
				align-items: center;

				.view {
					height: 40rpx;
					background: rgba(0, 0, 0, 0.4);
					border-radius: 2rpx;
					font-size: 24rpx;
					font-family: PingFang SC;
					font-weight: 500;
					color: #FFFFFF;
					padding: 0 11rpx;
				}
			}

			.already {
				background: #cdd5de !important;
			}

			.list {
				margin-bottom: 60rpx;
				min-height: 168rpx;
				border-radius: 20rpx;
				padding: 0 24rpx;

				.up {
					height: 100rpx;

					image {
						width: 76rpx;
						height: 76rpx;
						margin-right: 26rpx;
					}

					display: flex;
					align-items: center;
					font-size: 30rpx;
					font-family: PingFang SC;
					font-weight: bold;
					color: #333333;

					.date {
						margin-left: auto;
						font-size: 24rpx;
						font-family: PingFang SC;
						font-weight: 500;
						color: #999999;
					}
				}

				.down {
					background: #FFFFFF;
					border-radius: 20rpx;
					padding: 24rpx;
					font-family: PingFang SC;
					font-weight: 500;
					color: #999999;
					padding-top: 40rpx;
					padding-bottom: 40rpx;
				}
			}
		}
	}
</style>
